/* 统计组件统一样式 */

/* 基础卡片样式 */
.stat-card {
  border-radius: 12px;
  padding: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

/* 悬停效果 */
.stat-card:hover {
  transform: translateY(-3px);
}

/* 渐变背景主题 */
.stat-card.theme-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  color: white;
}

.stat-card.theme-blue:hover {
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.stat-card.theme-cyan {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 4px 20px rgba(79, 172, 254, 0.3);
  color: white;
}

.stat-card.theme-cyan:hover {
  box-shadow: 0 8px 30px rgba(79, 172, 254, 0.4);
}

.stat-card.theme-purple {
  background: linear-gradient(135deg, #8B5FBF 0%, #6A4C93 100%);
  box-shadow: 0 4px 20px rgba(139, 95, 191, 0.3);
  color: white;
}

.stat-card.theme-purple:hover {
  box-shadow: 0 8px 30px rgba(139, 95, 191, 0.4);
}

.stat-card.theme-pink {
  background: linear-gradient(135deg, #FF6B9D 0%, #E91E63 100%);
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
  color: white;
}

.stat-card.theme-pink:hover {
  box-shadow: 0 8px 30px rgba(255, 107, 157, 0.4);
}

.stat-card.theme-green {
  background: linear-gradient(135deg, #36D1DC 0%, #5B86E5 100%);
  box-shadow: 0 4px 20px rgba(54, 209, 220, 0.3);
  color: white;
}

.stat-card.theme-green:hover {
  box-shadow: 0 8px 30px rgba(54, 209, 220, 0.4);
}

/* 光泽效果 */
.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

/* 确保内容在光泽效果之上 */
.stat-card > * {
  position: relative;
  z-index: 2;
}

/* 统一标题样式 */
.stat-title,
.caption-text {
  font-size: 16px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 统计数值样式 */
.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 1) !important;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 用户卡片特殊样式 */
.user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 8px;
}

.user-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* 响应式设计 */
@media (max-width: 707px) {
  .stat-card {
    padding: 15px;
    margin: 10px;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .stat-title,
  .caption-text {
    font-size: 14px;
    margin-bottom: 15px;
  }
}

/* 图表容器样式 */
.chart-container {
  position: relative;
  z-index: 2;
}

/* 时间统计特殊样式 */
.time-stat {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
}

.time-value {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 1) !important;
  margin-bottom: 8px;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.time-unit {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9) !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 单词统计布局 */
.word-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  width: 100%;
}

.word-stat-item {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* 学习时间网格布局 */
.learning-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  width: 100%;
}

.learning-time-item {
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  animation: fadeInUp 0.6s ease-out;
}

/* 确保图表组件在卡片内正确显示 */
.stat-card .chart-component {
  position: relative;
  z-index: 2;
}
